home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekikoh Dennoh Club 5
/
Gekikoh Dennoh Club Vol. 5 (Japan).7z
/
Gekikoh Dennoh Club Vol. 5 (Japan) (Track 01).bin
/
internet
/
xip
/
iijppp.lzh
/
src
/
mbuf.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-01-05
|
1KB
|
46 lines
#ifndef _MBUF_H_
#define _MBUF_H_
struct mbuf {
u_char *base; /* pointer to top of buffer space */
short size; /* size allocated from base */
short offset; /* offset to start position */
short cnt; /* available byte count in buffer */
short type;
struct mbuf *next; /* link to next mbuf */
struct mbuf *pnext; /* link to next packet */
};
struct mqueue {
struct mbuf *top;
struct mbuf *last;
int qlen;
};
#define NULLBUFF ((struct mbuf *)0)
#define MBUF_CTOP(bp) (bp->base + bp->offset)
#define MB_ASYNC 1
#define MB_FSM 2
#define MB_HDLCOUT 3
#define MB_IPIN 4
#define MB_ECHO 5
#define MB_LQR 6
#define MB_MODEM 7
#define MB_VJCOMP 8
#define MB_LOG 9
#define MB_IPQ 10
#define MB_MAX MB_IPQ
extern int plength(struct mbuf *bp);
extern struct mbuf *mballoc(int cnt, int type);
extern struct mbuf *mbfree(struct mbuf *bp);
extern void pfree(struct mbuf *bp);
extern void mbwrite(struct mbuf *bp, u_char *ptr, int cnt);
extern struct mbuf *mbread(struct mbuf *bp, u_char *ptr, int cnt);
extern void DumpBp(struct mbuf *bp);
extern void Enqueue(struct mqueue *queue, struct mbuf *bp);
extern struct mbuf *Dequeue(struct mqueue *queue);
#endif